﻿using System.Diagnostics;
using System.Reactive.Linq;
using System.Windows.Input;
using ReactiveUI;
namespace Avalonia.MusicStore.ViewModels;

public partial class MainWindowViewModel : ViewModelBase {
    public ICommand BuyMusicCommand { get; }
    public Interaction<MusicStoreViewModel, AlbumViewModel?> ShowDialog { get; }

    public MainWindowViewModel() {
        ShowDialog = new Interaction<MusicStoreViewModel, AlbumViewModel?>();
        BuyMusicCommand = ReactiveCommand.CreateFromTask(async () => {
            var store = new MusicStoreViewModel();
            var result = await ShowDialog.Handle(store);
        });
    }
}